<!DOCTYPE html>
<html>

<head>
	<meta charset="UTF-8">
	<title>闲时播报</title>
	<link rel="stylesheet" href="../css/common2.css">
</head>

<body class="main-body">
	<div id="vue-root" style="margin-top:50px;">

		<div class="search_box">
			<div class="add">
				<a href="carousel_item.html" style="color: white">添加播报</a>
			</div>
			<div class="refresh" onclick="location.reload()" style="display: inline-block;">刷新</div>

			<!-- <input placeholder="请输入标题" class="search search_student" v-model="search.t1"
				style="margin-top: -35px;width: 130px;right: 230px;height: 35px">

			<div class="agent">
				<select class="search" v-model="search.t2"
					style="margin-top: -35px;width: 132px;right: 90px;height: 37px">
					<option value="null">请选择状态</option>
					<option value="1">全屏播报</option>
					<option value="2">二分之一屏播报</option>
				</select>
			</div>

			<img src="../image/search.png" height="35" width="35" class="search_img" @click="findsubmit"
				style="position: absolute; right: 3%;margin-top: -35px;"> -->
		</div>
		<div class="table ">
			<table class="table_top">
				<thead>
					<tr>
						<th class="two">
							<input type="checkbox" class="check-box" v-model="all">
						</th>
						<th>序号</th>
						<th class="two">标题</th>
						<th class="two">状态</th>
						<th class="two">类型</th>
						<th class="two">设备名称</th>
						<th class="two">播报日期</th>
						<th class="two">播报时间</th>
						<th style="width: 120px">编辑/删除</th>
					</tr>
				</thead>
				<tbody id="list">
					<tr v-for="(item,index) in list" :key="item.id">
						<td>
							<input type="checkbox" class="check-box">
						</td>
						<td><span v-text="index+1"></span></td>
						<td class="two" v-text="item.title"></td>
						<td class="two" v-text="['全屏','二分之一屏'][item.status]"></td>
						<td class="two" v-text="['图片','视频','文本'][item.type]"></td>
						<td class="two" v-text="item.deviceName"></td>
						<td class="two" v-text="item.startDate+'至'+item.endDate"></td>
						<td class="two" v-text="item.startTime+'至'+item.endTime"></td>
						<td style="width: 120px">
							<div class="option">
								<div class="edit-icon option-icon">
									<a :href="'carousel_item.html?id='+item.id"
										style="position: absolute; left: 20%; top: 30%;">
										<img class="img" src="../image/edit.png" height="20" width="20"
											onmouseover="this.src='../image/edit_light.png'"
											onmouseout="this.src='../image/edit.png'" />
									</a>
								</div>
								<div class="delete-icon option-icon" @click="del([item.id])"
									style="right: 20%; top:30%;position: absolute;">
									<img class="img" src="../image/delete.png" height="20" width="20"
										onmouseover="this.src='../image/delete_light.png'"
										onmouseout="this.src='../image/delete.png'" />
								</div>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
		</div>

		<div class="delete" @click="batchDelete">批量删除</div>

		<ul class="pagination" v-if="pages>1">
			<li>
				<a v-if="pageNum!=1" @click="pageNum=1">«</a>
				<a class="pages-jump" v-if="pageNum!=1" @click="pageNum--">‹</a>
				<a v-text="pageNum"></a>
				<a class="pages-jump" v-if="pageNum!=pages" @click="pageNum++">›</a>
				<a v-if="pageNum!=pages" @click="pageNum=pages">»</a>
			</li>
			<li>
				<a v-text="pages"></a>
				<!--页面总数-->
			</li>
		</ul>
		<div style="float: right;margin-bottom: 20px;" v-if="pages>1">
			总共{{total}}条记录
			<select class="ui-select init" style="height:32px" v-model="pageSize">
				<!--style="margin-top: 14px;"-->
				<option :value="10">每页10条</option>
				<option :value="30">每页30条</option>
				<option :value="100">每页100条</option>
			</select>
		</div>

	</div>

	<script src="/scriptZIP/qs.min.js"></script>
	<script src="/scriptZIP/vue.min.js"></script>
	<script src="/scriptZIP/axios.min.js"></script>
	<script src="/lib/laydate/laydate.js"></script>
	<script src="/js/common.js"></script>
	<script src="/js/list.js"></script>
	<script>

		var schoolId = top_params().id;

		var app = new Vue(merge({
			data: {
				urls: {
					list: '/pc/slide2/list/' + schoolId,
					del: '/pc/slide2/del'
				},
			},
			methods: {

			},
		}));
	</script>


</body>

</html>